﻿using System;

namespace Tzx.Tools.Payroll2Images.Exe.Api
{

/*
    {
        "errcode": 0,
        "errmsg": "0,ok",
        "send_result": {
            "errcode": 0,
            "errmsg": "ok",
            "request_id": "15sptfair1urd",
            "send_result": {
                "invalid_user_id_list": [],
                "forbidden_user_id_list": null,
                "failed_user_id_list": [],
                "read_user_id_list": [],
                "unread_user_id_list": ["manager7677"],
                "invalid_dept_id_list": [],
                "forbidden_list": []
            }
        }
    }
*/

    /// <summary>
    /// API发送结果状态
    /// </summary>
    internal class JSON_MessageAsyncSend_3_result
    {
        /// <summary>
        /// 公司api返回给exe结果
        /// </summary>
        public long errcode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string errmsg { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public JSON_send_result_bnapi send_result { get; set; }
    }

    /// <summary>
    /// 钉钉api返回公司api的结果
    /// </summary>
    internal class JSON_send_result_bnapi
    {
        /// <summary>
        /// 
        /// </summary>
        public long errcode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string errmsg { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string request_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public JSON_send_result_dd send_result { get; set; }
    }

    /// <summary>
    /// 钉钉异步消息发送结果
    /// </summary>
    internal class JSON_send_result_dd
    {
        /// <summary>
        /// 无效用户id
        /// </summary>
        public string[] invalid_user_id_list { get; set; }
        /// <summary>
        /// 被禁用户id
        /// </summary>
        public string[] forbidden_user_id_list { get; set; }
        /// <summary>
        /// 发送失败用户id
        /// </summary>
        public string[] failed_user_id_list { get; set; }
        /// <summary>
        /// 已读用户id
        /// </summary>
        public string[] read_user_id_list { get; set; }
        /// <summary>
        /// 未读用户id
        /// </summary>
        public string[] unread_user_id_list { get; set; }

        /// <summary>
        /// 无效部门id
        /// </summary>
        public string[] invalid_dept_id_list { get; set; }

        /// <summary>
        /// 推送被禁止的具体原因
        /// </summary>
        public JSON_SendForbiddenModel[] forbidden_list { get; set; }
    }

    /// <summary>
    /// 推送被禁止的具体原因
    /// </summary>
    internal class JSON_SendForbiddenModel
    {
        /// <summary>
        /// 流控code
        /// </summary>
        string code { get; set; }

        /// <summary>
        /// 流控阀值
        /// </summary>
        long count { get; set; }

        /// <summary>
        /// 被流控员工的userId
        /// </summary>
        string userid { get; set; }
    }

}
